package com.t.dianliangdemo;

import android.app.IntentService;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;

import androidx.annotation.Nullable;

public class MyIntentService extends IntentService {

    public MyIntentService(String name) {
        super(name);
    }

    public MyIntentService() {
        super(MyIntentService.class.getSimpleName());
    }

    @Override
    protected void onHandleIntent(@Nullable Intent intent) {
        if (intent != null) {
            //获取参数
            Bundle extras = intent.getExtras();

            Log.e("MyIntentService","我也启动了");
            //执行结束，释放唤醒锁
            MyWakefulReceiver.completeWakefulIntent(intent);
        }
    }
}